<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" xmlns:shiro="http://www.pollix.at/thymeleaf/shiro">
<head>
    <th:block th:include="include :: header('智能AI识别模型版本管理列表')" />
</head>
<body class="gray-bg">
<div class="container-div">
    <div class="row">
        <div class="col-sm-12 search-collapse">
            <form id="formId">
                <div class="select-list">
                    <ul>
                        <li>
                            模型类别：
                            <select name="modelKind">
                                <option value="" placeholder="--请选择模型类别--"  >--请选择模型类别--</option>
                                <option value="目标检测"  >目标检测</option>
                                <option value="图像分类" >图像分类</option>
                            </select>
                        </li>
                        <li>
                            模型名称：
                            <select name="modelName">
                                <option value="" placeholder="--请选择模型名称--"  >--请选择模型名称--</option>
                                <option value="人和安全帽">人和安全帽</option>
                                <option value="人员装备">人员装备</option>
                                <option value="主煤流检测">主煤流检测</option>
                                <option value="人和车检测">人和车检测</option>
                                <option value="煤流量">煤流量</option>
                            </select>
                        </li>
                        <li>
                            <a class="btn btn-primary btn-rounded btn-sm" onclick="$.table.search()"><i class="fa fa-search"></i>&nbsp;搜索</a>
                            <a class="btn btn-warning btn-rounded btn-sm" onclick="$.form.reset()"><i class="fa fa-refresh"></i>&nbsp;重置</a>
                        </li>
                    </ul>
                </div>
            </form>
        </div>


        <div class="col-sm-12 select-table table-striped">
            <table id="bootstrap-table"></table>
        </div>
    </div>
</div>
<th:block th:include="include :: footer" />
<script th:inline="javascript">
    var editFlag = [[${@permission.hasPermi('AI:VersionService:edit')}]];
    var removeFlag = [[${@permission.hasPermi('AI:VersionService:remove')}]];
    var prefix = ctx + "AI/VersionService";

    $(function() {
        var options = {
            url: prefix + "/list",
            createUrl: prefix + "/add",
            updateUrl: prefix + "/edit/{id}",
            removeUrl: prefix + "/remove",
            exportUrl: prefix + "/export",
            modalName: "智能AI识别模型版本管理",
            columns: [{
                checkbox: true
            },
                {
                    field: 'versionId',
                    title: '鐗堟湰鍙稩D',
                    visible: false
                },
                {
                    field: 'modelId',
                    title: '模型编码'
                },
                {
                    field: 'modelName',
                    title: '模型名称'
                },
                {
                    field: 'modelKind',
                    title: '模型类别'
                },
                {
                    field: 'oldVersion',
                    title: '已发布版本'
                },
                {
                    field: 'publishVersion',
                    title: '最新版本'
                },
                {
                    field: 'versionRemark',
                    title: '模型描述'
                },
                {
                    title: '操作',
                    align: 'center',
                    formatter: function(value, row, index) {
                        var actions = [];
                        actions.push('<a class="btn btn-success btn-xs ' + editFlag + '" href="javascript:void(0)" onclick="$.operate.edit(\'' + row.versionId + '\')"><i class="fa fa-edit"></i>编辑</a> ');
                        actions.push('<a class="btn btn-danger btn-xs ' + removeFlag + '" href="javascript:void(0)" onclick="$.operate.remove(\'' + row.versionId + '\')"><i class="fa fa-remove"></i>删除</a>');
                        return actions.join('');
                    }
                }]
        };
        $.table.init(options);
    });
</script>
</body>
</html>